<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>2-trimStart与trimEnd</title>
</head>
<body>
    <script>
        // trim
        let str = `    iloveyou    `;

        console.log(str);
        console.log(str.trimStart());
        console.log(str.trimEnd());
    </script>
</body>
</html>